package bean;

public class SubCategory {
    private Integer id;
    private String name;
    private Integer categoryId;
    private String description;
    private Category category;

    // 无参构造函数
    public SubCategory() {
    }

    // 有参构造函数
    public SubCategory(Integer id, String name, Integer categoryId, String description, Category category) {
        this.id = id;
        this.name = name;
        this.categoryId = categoryId;
        this.description = description;
        this.category = category;
    }

    // Getter和Setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    @Override
    public String toString() {
        return "SubCategory{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", categoryId=" + categoryId +
                ", description='" + description + '\'' +
                ", category=" + category +
                '}';
    }
} 